import { fromJS } from 'immutable'
import FindMethod from '../methods/FindMethod'

const defaultState = fromJS({
  swiper: [],
  swiper2: [],
  Recommend:[],
  Recommend2:[],
  List:[],
  cartoon:[],
  detail:[],
  detail2:[]
})

export default (state = defaultState, action) => {
  try {
    return FindMethod[action.type](state, action)
  } catch (e) {
    return state
  }
}